home *** CD-ROM | disk | FTP | other *** search
- @echo off
- ! trash.bat Batch file to trash a folder or a file
- !
- ! trash name
- !
- ! where 'name' is the item to be trashed. The name can be preceded by
- ! a path and a volume ID.
- !
- ! trash.bat executes trashfile and trashdir
- !
- ! Copyright © 1994 by Rainbow Hill Pty Ltd. All rights reserved.
- !
-
- ! ensure that the first parameter is there and that the second one is not
- set doserr=13
- if not "%2 " == " " goto ERR_LBL
- if "%1 " == " " goto ERR_LBL
-
- ! do the trashing
- if existdir "%1" trashdir "%1"
- trashfile "%1"
- ! it never returns
-
- :ERR_LBL
- show %doserr%
-